/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #ffd600;
    --accent-color: #ff6b6b;
    --age-3-4-color: #ff9e80;
    --age-5-6-color: #80d8ff;
    --age-7-8-color: #b388ff;
    --light-bg: #f8f9fa;
    --border-radius: 15px;
    --content-width: 1140px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 全局重置与基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Comic Sans MS', 'Marker Felt', 'Arial Rounded MT Bold', sans-serif;
    background-color: #f0f8ff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 改进的容器样式 */
.container-fluid {
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--spacing-md);
    position: relative;
}

/* 主内容区域容器 */
.content-container {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 卡片行布局 */
.card-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* 卡片列布局 */
.card-column {
    flex: 1;
    min-width: 280px;
}

/* 区域标题样式 */
.section-title {
    position: relative;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    text-align: center;
    font-weight: 700;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    background: linear-gradient(to right, #4a90e2, #80d8ff);
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

.navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 1.1rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    margin: 0 var(--spacing-xs);
    transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #fff !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* 改进导航菜单样式 */
.navbar-nav {
    display: flex;
    flex-wrap: wrap;
}

.navbar-nav .nav-item {
    position: relative;
    margin: 0 5px;
}

.navbar-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-item:hover::after,
.navbar-nav .nav-item.active::after {
    width: 80%;
}

.navbar-light .navbar-nav .nav-item.active .nav-link {
    color: #fff !important;
    font-weight: 700;
}

/* 下拉菜单样式 */
.dropdown-menu {
    display: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: none;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
}

.dropdown-toggle.show + .dropdown-menu {
    display: block;
}

.dropdown-item {
    border-radius: 8px;
    padding: 8px 15px;
    margin: 5px 0;
    transition: all 0.3s;
    color: var(--primary-color);
}

.dropdown-item:hover {
    background-color: rgba(65, 105, 225, 0.1);
    color: #4169E1;
    transform: translateX(5px);
}

/* 登录注册按钮样式 */
.auth-buttons {
    display: flex;
    margin-left: auto;
}

.btn-outline-light {
    border-radius: 20px;
    border-width: 2px;
    font-weight: 500;
    padding: 8px 20px;
    transition: all 0.3s;
}

.btn-light {
    border-radius: 20px;
    font-weight: 500;
    padding: 8px 20px;
    background-color: #fff;
    border-color: #fff;
    color: #4a90e2;
    transition: all 0.3s;
}

.btn-light:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* 导航菜单响应式样式 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(74, 144, 226, 0.95);
        border-radius: 0 0 15px 15px;
        padding: 15px;
        margin-top: 10px;
        box-shadow: var(--shadow-md);
    }
    
    .auth-buttons {
        margin-top: 10px;
        justify-content: center;
    }
}

/* 横向菜单样式 */
.horizontal-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.horizontal-menu li {
    margin: 0 10px;
    position: relative;
    animation: staggerFade 0.6s ease forwards;
    opacity: 0;
}

.horizontal-menu li:nth-child(1) {
    animation-delay: 0.1s;
}

.horizontal-menu li:nth-child(2) {
    animation-delay: 0.2s;
}

.horizontal-menu li:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes staggerFade {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.horizontal-menu a {
    display: inline-block;
    padding: 12px 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.horizontal-menu a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.horizontal-menu a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.horizontal-menu a:hover:before {
    transform: translateY(0);
}

.horizontal-menu a.active {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
}

.horizontal-menu a.active:before {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

.horizontal-menu .age-3-4 {
    background: linear-gradient(45deg, var(--age-3-4-color) 0%, #ffcc80 50%, var(--age-3-4-color) 100%);
    background-size: 200% auto;
    transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.horizontal-menu .age-5-6 {
    background: linear-gradient(45deg, var(--age-5-6-color) 0%, #84ffff 50%, var(--age-5-6-color) 100%);
    background-size: 200% auto;
    transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.horizontal-menu .age-7-8 {
    background: linear-gradient(45deg, var(--age-7-8-color) 0%, #ea80fc 50%, var(--age-7-8-color) 100%);
    background-size: 200% auto;
    transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.horizontal-menu a:hover {
    background-position: right center;
}

/* 菜单图标样式 */
.menu-icon {
    margin-right: 8px;
    display: inline-block;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.horizontal-menu a:hover .menu-icon {
    transform: scale(1.2) rotate(10deg);
    animation: wiggle 0.5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg) scale(1.2); }
    25% { transform: rotate(-10deg) scale(1.2); }
    50% { transform: rotate(10deg) scale(1.3); }
    75% { transform: rotate(-5deg) scale(1.2); }
}

/* 欢迎横幅 */
.welcome-banner {
    background: url('../images/banner-bg.jpg') center/cover no-repeat;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    color: #fff;
    padding: var(--spacing-lg) !important;
    box-shadow: var(--shadow-md);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    border: 5px solid #fff;
    position: relative;
    overflow: hidden;
}

.welcome-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.6) 0%, rgba(255, 214, 0, 0.6) 100%);
    z-index: 1;
}

.welcome-banner .content {
    position: relative;
    z-index: 2;
}

.welcome-banner h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 年龄卡片样式 */
.age-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: var(--shadow-md);
    border: none;
    position: relative;
}

.age-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.age-card-3-4 {
    background: linear-gradient(135deg, var(--age-3-4-color), #ffcc80);
}

.age-card-5-6 {
    background: linear-gradient(135deg, var(--age-5-6-color), #84ffff);
}

.age-card-7-8 {
    background: linear-gradient(135deg, var(--age-7-8-color), #ea80fc);
}

.age-card .card-body {
    padding: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.age-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.age-card:hover:before {
    opacity: 1;
}

.age-card .card-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.age-card .card-text {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.age-card .btn {
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    border: 2px solid #fff;
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: all 0.3s ease;
}

.age-card .btn:hover {
    background-color: #fff;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 问题类型卡片 */
.question-type-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border: 3px solid #eaeaea;
    background: white;
}

.question-type-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.question-type-img {
    max-width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 1rem auto;
    border: 3px solid var(--primary-color);
    padding: 5px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.question-type-card:hover .question-type-img {
    transform: scale(1.1) rotate(5deg);
}

/* 会员卡片样式 */
.membership-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: var(--shadow-md);
    border: none;
    position: relative;
}

.membership-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.membership-card .card-header {
    padding: 1.5rem 1rem;
    border-bottom: none;
    text-align: center;
}

.membership-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0.5rem;
    color: var(--primary-color);
}

.basic-membership .card-header {
    background-color: #e3f2fd;
    position: relative;
    overflow: hidden;
}

.gold-membership .card-header {
    background-color: #fff8e1;
    color: #ff9800;
    position: relative;
    overflow: hidden;
}

.gold-membership .price {
    color: #ff9800;
}

.diamond-membership .card-header {
    background: linear-gradient(135deg, #e1f5fe, #e8eaf6);
    color: #673ab7;
    position: relative;
    overflow: hidden;
}

.diamond-membership .price {
    color: #673ab7;
}

.membership-card .card-header:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(45deg);
    transition: all 0.8s ease;
}

.membership-card:hover .card-header:before {
    transform: rotate(90deg);
}

.membership-card .list-group-item {
    padding: 0.75rem 1.25rem;
    border: none;
    background-color: transparent;
    position: relative;
    padding-left: 2rem;
    transition: all 0.3s ease;
}

.membership-card .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateX(5px);
}

.membership-card .list-group-item:before {
    content: "✓";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.diamond-membership .list-group-item:before {
    color: #673ab7;
}

.gold-membership .list-group-item:before {
    color: #ff9800;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(74, 144, 226, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-primary:hover:after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.btn-primary:hover {
    background-color: #3a7bbf;
    border-color: #3a7bbf;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(74, 144, 226, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(74, 144, 226, 0.2);
}

/* 页脚样式 */
footer {
    background-color: var(--light-bg);
    color: #666;
    border-top: 1px solid #eaeaea;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

footer .social-links {
    display: flex;
    gap: var(--spacing-sm);
}

footer .social-links a {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* 响应式样式 */
@media (max-width: 992px) {
    :root {
        --content-width: 95%;
    }
    
    .container {
        padding: var(--spacing-sm);
    }
    
    .welcome-banner h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .welcome-banner h1 {
        font-size: 2rem;
    }
    
    .welcome-banner {
        padding: var(--spacing-md) !important;
    }
    
    .card-row {
        flex-direction: column;
    }
    
    .age-card .card-body,
    .question-type-card .card-body,
    .membership-card .card-body {
        padding: var(--spacing-sm);
    }
    
    .question-type-img {
        max-width: 100px;
        height: 100px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* 无障碍支持 */
a:focus, button:focus, .btn:focus {
    outline: 3px solid rgba(74, 144, 226, 0.5);
    outline-offset: 2px;
} 